Outdoor activities, such as running, biking, etc., have become an indispensable part of many people's lives. People often use electronic devices during these outdoor activities. For example, a runner listens to music through an earphone connected to an electronic device, and a biker connects an electronic device to a bicycle generator to recharge the electronic device. The electronic device is connected to other devices through a connector using friction or magnetic force. However, when the electronic device is in motion, the connector using friction or magnetic force may not provide a stable connection, thereby resulting in a high risk of disconnection and losing the electronic device.